const express = require('express');
const router = express.Router();

// 导入子路由
const yaopinRoutes = require('./yaopin');
const userRoutes = require('./user');

// 注册路由
router.use('/samples', yaopinRoutes);
router.use('/users', userRoutes);

// API 状态检查
router.get('/status', (req, res) => {
  res.json({
    status: 'ok',
    timestamp: new Date().toISOString(),
    uptime: process.uptime()
  });
});

module.exports = router; 